#将字符串转换为整型
a = '123'
print(type(a))
b = int(a)
print(type(b))
#将浮点数转换为整型
c = 12.3
print(type(c))
d = int(c)
print(d)
print(type(d))
#将布尔类型转换为整型
e = True
print(e)
f = int(e)
print(type(e))



#如果字符串有一些非法字符不能转换
g = '12.3'
print(g)
h = int(g)
print(type(g))
#
i = '12ab'
print(type(i))
j = int(i)
print(b)